# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Jonathan Liu <net147@gmail.com>

pkgname=python-pyicu
pkgver=2.11
pkgrel=2
pkgdesc="Python binding for ICU"
arch=('loong64' 'x86_64')
license=('MIT')
url="http://pyicu.osafoundation.org/"
depends=('python' 'icu')
makedepends=('python-setuptools')
checkdepends=('python-fonttools' 'python-pytest' 'python-six')
source=("https://pypi.io/packages/source/P/PyICU/PyICU-$pkgver.tar.gz")
sha512sums=('d57ca2b29eafe336efca5285e10c9bfe1a6a1b575b3e52accd86a114ccf289bea0c004a5b26bd4e800211cca61df5aa1a11348a3f1dc73672b7b76dd971d6a25')

build() {
  cd PyICU-$pkgver
  python setup.py build
}

check() {
  cd PyICU-$pkgver
  python setup.py test
}

package() {
  cd PyICU-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
